package crm.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import crm.services.StatisticsService;

@Controller
public class MainController {

	String ololo = "Hello!";

	private StatisticsService statisticsService;

	public void setStatisticsService(StatisticsService statisticsService) {
		this.statisticsService = statisticsService;
	}


	@RequestMapping("clients")
	public ModelAndView main() {
		ModelAndView mnv = new ModelAndView();

		mnv.addObject("listOfClients", statisticsService.getClients());

		return mnv;
	}
}
